<?php

/*
    [GRIRMS] (C) 2009 Grandison & JM Technologies

    @author kevin<hasson.lai@mobile-grandison.com>
    @version $Id: validate.func.php v1 2010-09-19 kevin $
*/

//此文件用来验证相关字段数据是否有效

if(!defined('IN_GRIRMS')) {
	exit('Access Denied');
}

function check_email($email_address){
    if(eregi('^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.([a-zA-Z]{2,4})$', $email_address)){
        return true;
    }else{
        return false;
    }
}

function check_phone($phone){
    return preg_match('/^1\d{10}$/', $phone);

}
?>
